home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 04 (1988)(MegaDisc Digital Publishing)(AU)[m][WB].zip / MegaDisc 04 (1988)(MegaDisc Digital Publishing)(AU)[m][WB].adf / Articles / CLI-colours < prev    next >
Text File  |  2007-12-01  |  5KB  |  118 lines

  1.  
  2.  
  3.                            Using Colours in the CLI
  4.                            ************************
  5.                                                   By Ross Kellaway.
  6.  
  7.  
  8.            The following text is intended to help you put more colour into
  9.        CLI environment and is also know to work well with the Epson EX-800
  10.        colour printer.
  11.  
  12.        To use colour in your CLI's first open a new CLI, then type in the
  13.        following: copy * to device:filename [Return]
  14.        eg: copy * to ram:colours  [Return]
  15.        or if you have a printer you can type:
  16.  
  17.        copy * to prt: [Return]
  18.  
  19.        In doing this you have directed all keyboard input to the specified
  20.        device and/or file. Now, if you directed input to prt: and you have
  21.        your printer turned on, it will now print each line of input from the
  22.        keyboard every time you press RETURN. Sort of an electric typewriter.
  23.  
  24.        If you have directed output to the printer and you have a colour
  25.        printer then the following colour screen codes could give you colour
  26.        output text from your printer. (I can only vouch to the Epson ex-800
  27.        printer and the Olivetti DM105 because they are the only ones I have
  28.        and they work well with the screen codes).
  29.  
  30.        The Colour codes you specify, in this way will change the text colour,
  31.        background colour and the text style of all input to the CLI window
  32.        from which you entered these codes. The actual colours you get from
  33.        the CLI will depend on the four colours you have chosen in preferences
  34.        eg: although esc[31m code will give red printing on the Epson Ex-800
  35.        it will not necessarily give you red on the screen in the CLI window.
  36.  
  37.        To exit the command mode press:  ctrl \ [return]
  38.  
  39.        COLOUR & STYLE CODES FOR THE SCREEN USING WORKBENCH DEFAULT COLOURS
  40.        *******************************************************************
  41.         (This heading was preceded by Esc[32m, and turned off by Esc[0m )
  42.  
  43.        The format of the escape sequence is esc[Sn;Fn;Bnm
  44.        esc[ means to press the ESC key and the [ key simultaneously
  45.  
  46.        Sn is the style coding: where Sn is a number corresponding to one of
  47.        the following text styles.
  48.  
  49.        0 = Plain text
  50.        1 = Bold face
  51.        3 = Italic
  52.        4 = Underline
  53.        7 = Inverse
  54.  
  55.        Fn is the Foreground colour coding where Fn is one of the following
  56.  
  57.        30 = Default
  58.        31 = White
  59.        32 = Binary complement colour (black for default workbench settings)
  60.        33 = Red
  61.  
  62.        Bn is the Background colour coding where Bn is one of the following
  63.  
  64.        40 = Default
  65.        41 = White
  66.        42 = Binary complement colour
  67.        43 = Red
  68.  
  69.        eg: esc[1;33;41m
  70.  
  71.           This will give a boldface red text on a white background. Now all
  72.        your input to the screen will be colour as above.
  73.  
  74.        As mentioned above, to now exit the command mode and carry on as usual
  75.        press CTRL-\. Now your Cli window will function normally but you will
  76.        have the colours and style you chose above displayed in this window.
  77.  
  78.  
  79.        USING THE COLOUR CODES FOR THE EPSON EX-800 PRINTER
  80.        ***************************************************
  81.        If you directed output to the printer using the command
  82.  
  83.        Copy * to prt:
  84.  
  85.        Then the esc[Fnm will work here as well, only the colours are not
  86.        dependent on the preference settings. the colours are as follows:
  87.  
  88.        Esc[31m  will give  RED    printing
  89.  
  90.        Esc[32m  will give  GREEN  printing
  91.  
  92.        Esc[33m  will give  YELLOW printing
  93.  
  94.        Esc[34m  will give  PURPLE printing
  95.  
  96.        Esc[35m  will give  PINK   printing
  97.  
  98.        Esc[36m  will give  BLUE   printing
  99.  
  100.  
  101.        NOTE that the "m" after all the ESC[ codes has to be present and MUST
  102.        be in LOWER case.
  103.  
  104.        Once again close the command mode using CTRL \ and output to the
  105.        printer will be in the specified colour if you do ascii text dumps to
  106.        the printer, eg: using the TYPE command from any CLI or the print
  107.        command from within a directory utility such as DUIV. Unfortunately
  108.        word processors such as Scribble send an Initialize command to the
  109.        printer before printing thus cancelling the colour code, but if you
  110.        select the Command string option from within Scribble and specify one
  111.        of the Escape sequences above the all printing will be in the chosen
  112.        colour (likewise in "Organise" via the "set-up string").
  113.  
  114.                           END OF CLI-COLOURS 
  115.  
  116.